package wiiusej.apptest.statistics;

import java.sql.Timestamp;
import java.util.Date;
import java.util.Vector;

public class AccelerationPaquet {

	
	private Timestamp time;	
	private int counter;
	
	
	private Vector<Integer> accX = new Vector<Integer>();
	private Vector<Integer> accY = new Vector<Integer>();
	private Vector<Integer> accZ = new Vector<Integer>();
	
	
	public AccelerationPaquet(Timestamp time){
		this.counter = 0;
		this.time = time;		
	}
	
	
	public int uploadCounter(){
		return counter++;
	}


	public Timestamp getTime() {
		return time;
	}


	public void setTime(Timestamp time) {
		this.time = time;
	}


	public int getCounter() {
		return counter;
	}


	public void setCounter(int counter) {
		this.counter = counter;
	}


	public Vector<Integer> getAccX() {
		return accX;
	}


	public void setAccX(Vector<Integer> accX) {
		this.accX = accX;
	}
	
	public void addAccX(int accX){
		this.accX.add(accX);
	}


	public Vector<Integer> getAccY() {
		return accY;
	}


	public void setAccY(Vector<Integer> accY) {
		this.accY = accY;
	}
	
	public void addAccY(int accY){
		this.accY.add(accY);
	}


	public Vector<Integer> getAccZ() {
		return accZ;
	}


	public void setAccZ(Vector<Integer> accZ) {
		this.accZ = accZ;
	}
	
	public void addAccZ(int accZ){
		this.accZ.add(accZ);
	}
	
	@Override
	public String toString(){		
		return "[" + accX.lastElement() + "," + accY.lastElement() + "," + accZ.lastElement() + "]";
	}
	
	public String printFullList(){
		return accZ.toString();
	}
	
	public String printTimeStamp(){		
		return "[Time: " + getTime() + " Packets: " + getCounter() + "]";
	}
	
}
